public class demo5 {
    public static void main(String[] args) {
        int x = 1;
        while(true){
            if(x%5==1){
                int a = (x-1)/5*4;
                if(a%5==2){
                    int b = (a-1)/5*4;
                    if(b%5==3){
                        int c = (b-1)/5*4;
                        if(c%5==4){
                            int d = (c-1)/5*4;
                            if(d%5==0 && d>0){
                                int e = (d-1)/5*4;
                                break;
                            }
                        }
                    }
                }
            }
            x++;
        }
        System.out.println(x);
    }
}
